﻿using System;


namespace IDEAMS.model.alarm
{
    public class AlarmInfo
    {
        public string key {  get; set; }

        public string serialNo { get; set; }
        public int channelNo {  get; set; }

        public int gratingNo { get; set; }

        public AlarmType type { get; set; }

        public DateTime startTime { get; set; }

        public DateTime endTime { get; set; }
        /// <summary>
        /// 最大差值
        /// </summary>
        public double maxDiff { get; set; }

        public ProcessStep step { get; set; }

        public string description { get; set; }


        public AlarmInfo()
        {
            maxDiff = 0;
        }

        public AlarmInfo(AlarmInfo info)
        {
            Copy(info);
        }

       public void Copy(AlarmInfo info)
        {
            this.key = info.key;
            this.serialNo = info.serialNo;
            this.channelNo = info.channelNo;
            this.gratingNo = info.gratingNo;
            this.startTime = info.startTime;
            this.endTime = info.endTime;
            this.step = info.step;
            this.maxDiff = info.maxDiff;
            this.description = info.description;
            this.type = info.type;
        }

        public AlarmInfo Clone()
        {
            return new AlarmInfo(this);
        }
    }
}
